<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/4/23
  Time: 11:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta property="lang" content="zh_CN">
    <title>言曌博客 | 文章管理</title>
    <link rel="shortcut icon" type="images/x-icon" href="/upload/2018/10/logo20181111185335360.png">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/pace.min.css">
    <link rel="stylesheet" href="css/adminlte.min.css">
    <link rel="stylesheet" href="css/_all-skins.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/loader.css">
    <link rel="stylesheet" href="css/jquery.toast.min.css">
    <link rel="stylesheet" href="css/fileinput.min.css">
    <link rel="stylesheet" href="css/owo.min.css">
    <link rel="stylesheet" href="css/pretty-checkbox.min.css">
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/owo.min.js"></script>
</head>
<body class="hold-transition sidebar-mini fixed skin-blue ">
<div class="wrapper">
    <!-- 顶部栏模块 -->
    <header class="main-header">
        <a href="/admin" class="logo">
            <span class="logo-mini"><b>S</b>S</span>
            <span class="logo-lg"><b>SE</b>NS</span>
        </a>
        <nav class="navbar navbar-static-top" role="navigation">
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li><a href="/" title="跳转到前台" target="_blank"><i class="fa fa-location-arrow"></i></a></li>
                    <li class="dropdown messages-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-bell-o"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">
                                你有 0 条新评论
                            </li>
                            <li>
                                <ul class="menu">
                                </ul>
                            </li>
                            <li class="footer"><a href="/admin/comment?status=1">查看所有评论</a></li>
                        </ul>
                    </li>
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="picture/1927d92e4aa543c8a2c764b6d096c335.gif" class="user-image" alt="User Image">
                            <span class="hidden-xs">xhz199838</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="user-header">
                                <img src="picture/1927d92e4aa543c8a2c764b6d096c335.gif" class="img-circle"
                                     alt="User Image">
                                <p>xhz199838</p>
                            </li>
                            <li class="user-footer">
                                <div class="pull-left"><a data-pjax="true" href="/admin/user/profile"
                                                          class="btn btn-default "><i class="fa fa-user"></i>个人资料</a>
                                </div>
                                <div class="pull-right"><a href="/admin/logOut" class="btn btn-default "><i
                                        class="fa fa-sign-out"></i>退出登录</a></div>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- 菜单栏模块 -->
    <aside class="main-sidebar">
        <section class="sidebar">
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="picture/1927d92e4aa543c8a2c764b6d096c335.gif" class="img-circle"
                         style="width: 45px;height: 45px;" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>xhz199838</p>
                    <a href="/admin/user/profile"><i
                            class="fa fa-circle text-success"></i>个人资料</a>
                </div>
            </div>
            <form action="/search" method="get" target="_blank" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="keyword" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
<button type="submit" name="keyword" id="search-btn" target="_blank" class="btn btn-flat">
<i class="fa fa-search"></i>
</button>
</span>
                </div>
            </form>
            <!--左侧菜单栏-->
            <ul class="sidebar-menu tree" data-widget="tree">
                <li class="header">HEADER</li>
                <li class="active"><a data-pjax="true" href="index.jsp"> <i class="fa fa-dashboard"></i> <span>仪表盘</span>
                </a></li>
                <li class="treeview"><a data-pjax="true" href="#"> <i class="fa fa-book"></i> <span>文章</span> <span
                        class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span> </a>
                    <ul class="treeview-menu">
                        <li><a data-pjax="true" href="post.jsp"> <i class="fa fa-circle-o"></i>所有文章 </a></li>
                        <li><a data-pjax="true" href="postnew.jsp"> <i class="fa fa-circle-o"></i>写文章 </a></li>
                        <li><a data-pjax="true" href="category.jsp"> <i class="fa fa-circle-o"></i>分类目录 </a></li>
                        <li><a data-pjax="true" href="tag.jsp"> <i class="fa fa-circle-o"></i>标签 </a></li>
                    </ul>
                </li>
                <li><a data-pjax="true" href="attachment.jsp"> <i class="fa fa-picture-o"></i> <span>附件</span> </a>
                </li>
                <li><a data-pjax="true" href="comment.jsp"> <i class="fa fa-comment"></i> <span>评论</span> </a></li>
                <li class="treeview"><a data-pjax="true" href="#"> <i class="fa fa-user-o"></i> <span>用户</span> <span
                        class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span> </a>
                    <ul class="treeview-menu">
                        <li><a data-pjax="true" href="userprofile.jsp"> <i class="fa fa-circle-o"></i>个人资料 </a></li>
                    </ul>
                </li>
            </ul>
        </section>
    </aside>
    <div class="content-wrapper">
        <style type="text/css" rel="stylesheet">
            .draft, .publish, .trash {
                list-style: none;
                float: left;
                margin: 0;
                padding-bottom: 10px
            }

            #btnNewPost {
                margin-left: 4px;
                padding: 3px 6px;
                position: relative;
                top: -4px;
                border: 1px solid #ccc;
                border-radius: 2px;
                background: #fff;
                text-shadow: none;
                font-weight: 600;
                font-size: 12px;
                line-height: normal;
                color: #3c8dbc;
                cursor: pointer;
                transition: all .2s ease-in-out
            }

            #btnNewPost:hover {
                background: #3c8dbc;
                color: #fff
            }
        </style>
        <section class="content-header">
            <h1 style="display: inline-block;">文章管理</h1>
            <a data-pjax="false" id="btnNewPost" href="/admin/post/new">
                写文章 </a>
            <ol class="breadcrumb">
                <li>
                    <a data-pjax="true" href="/admin">
                        <i class="fa fa-dashboard"></i> 首页</a>
                </li>
                <li><a data-pjax="true" href="#">文章管理</a></li>
                <li class="active">所有文章</li>
            </ol>
        </section>
        <section class="content container-fluid">
            <div class="row">
                <div class="col-xs-12">
                    <ul style="list-style: none;padding-left: 0">
                        <li class="publish">
                            <a data-pjax="true" href="/admin/post"
                               style="color: #000">已发布
                                <span class="count">(0)</span></a>&nbsp;|&nbsp;
                        </li>
                        <li class="draft">
                            <a data-pjax="true" href="/admin/post?status=1"
                            >草 稿
                                <span class="count">(0)</span></a>&nbsp;|&nbsp;
                        </li>
                        <li class="trash">
                            <a data-pjax="true" href="/admin/post?status=2"
                            >回收站
                                <span class="count">(0)</span></a>
                        </li>
                    </ul>
                </div>
                <div class="col-xs-12">
                    <div class="box box-primary">
                        <div class="box-body table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>标题</th>
                                    <th>作者</th>
                                    <th>分类目录</th>
                                    <th>标签</th>
                                    <th>评论</th>
                                    <th>访问量</th>
                                    <th>日期</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <th colspan="8"
                                        style="text-align: center">暂无数据
                                    </th>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="box-footer clearfix">
                            <div class="no-margin pull-left">
                                第1
                                /0页
                            </div>
                            <ul class="pagination no-margin pull-right">
                                <li><a data-pjax="true" class="btn btn-sm disabled"
                                       href="/admin/post?status=0">首页</a>
                                </li>
                                <li><a data-pjax="true" class="btn btn-sm disabled"
                                       href="/admin/post?status=0&page=0">上一页</a>
                                </li>
                                <li><a data-pjax="true" class="btn btn-sm disabled"
                                       href="/admin/post?status=0&page=2">下一页</a>
                                </li>
                                <li><a data-pjax="true" class="btn btn-sm disabled"
                                       href="/admin/post?page=0&status=0">尾页</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <script>
            function revertIt(postId) {
                $.ajax({
                    type: 'POST',
                    url: '/admin/post/revert',
                    async: false,
                    data: {
                        'postId': postId
                    },
                    success: function (data) {
                        if (data.code == 0) {
                            showMsg(data.msg, "error", 2000);
                        } else {
                            showMsgAndReload(data.msg, "success", 2000);
                        }
                    }
                });
            }

            function throwIt(postId) {
                layer.confirm('你确定要删除？', function (index) {
                    $.ajax({
                        type: 'POST',
                        url: '/admin/post/throw',
                        async: false,
                        data: {
                            'postId': postId
                        },
                        success: function (data) {
                            if (data.code == 0) {
                                showMsg(data.msg, "error", 2000);
                            } else {
                                showMsgAndReload(data.msg, "success", 2000);
                            }
                        }
                    });
                    layer.close(index);
                });
            }

            function removeIt(postId) {
                layer.confirm('你确定要删除？', function (index) {
                    $.ajax({
                        type: 'POST',
                        url: '/admin/post/remove',
                        async: false,
                        data: {
                            'postId': postId
                        },
                        success: function (data) {
                            if (data.code == 0) {
                                showMsg(data.msg, "error", 2000);
                            } else {
                                showMsgAndReload(data.msg, "success", 2000);
                            }
                        }
                    });
                    layer.close(index);
                });
            }
        </script>
    </div>
    <footer class="main-footer">
        <div class="pull-right hidden-xs"><a target="_blank" href="#">1.0.0</a></div>
        Thanks for using <strong><a data-pjax="true" href="/admin/sens">SENS</a>.</strong>
    </footer>
</div>
<script src="js/jquery.pjax.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/adminlte.min.js"></script>
<script src="js/jquery.toast.min.js"></script>
<script src="js/layer.js"></script>
<script src="js/fileinput.min.js"></script>
<script src="js/froala_editor.pkgd.min.js"></script>
<script src="js/zh_cn.js"></script>
<script src="js/image_manager.min.js"></script>
<script src="js/codemirror-4.inline-attachment.min.js"></script>
<script src="js/jquery.tag-editor.min.js"></script>
<script src="js/jquery.caret.min.js"></script>
<script src="js/jquery.hz2py-min.js"></script>
<script src="js/zh.min.js"></script>
<script src="js/app.js"></script>
<script> Pace.options = {restartOnRequestAfter: false};
$(document).ajaxStart(function () {
    Pace.restart();
});
$(document).pjax('a[data-pjax=true]', '.content-wrapper', {fragment: '.content-wrapper', timeout: 8000});
var heading = "提示"; </script>
</body>
</html>
